import {
	request
} from '../http.js'

// 商品分类
export const getShopCategoryList = (data) => {
	return request({
		url: '/api/service/category/getlist',
		method: 'POST',
		data
	})
}

// 商品分类
export const getServiceGoodsList = (data) => {
	return request({
		url: '/api/service/goods/getlist',
		method: 'POST',
		data
	})
}

// 商品详情 
export const getServiceGoodsDetail = (data) => {
	return request({
		url: '/api/service/goods/goodsinfo',
		method: 'POST',
		data
	})
}

// 收藏/取消收藏 
export const handlefollow = (data) => {
	return request({
		url: '/api/service/follow/handlefollow',
		method: 'POST',
		data
	})
}

// 评价列表
export const getServiceGoodsCommentList = (data) => {
	return request({
		url: '/api/service/comment/getlist',
		method: 'GET',
		data
	})
}

// 评价统计
export const getServiceGoodsCommentTotal = (data) => {
	return request({
		url: '/api/service/comment/totalComment',
		method: 'GET',
		data
	})
}

// 地址列表
export const getAddressList = (data) => {
	return request({
		url: '/api/wanlshop/address/getaddress',
		method: 'POST',
		data
	})
}

// 获取地理位置 
export const getLocation = (data) => {
	return request({
		url: '/api/service/user/getlocation',
		method: 'POST',
		data
	})
}

// 获取字母排序省市区信息 
export const getCities = (data) => {
	return request({
		url: '/api/service/user/cities',
		method: 'POST',
		data
	})
}

// 获取市下所有区域
export const getSysArea = (data) => {
	return request({
		url: '/api/service/user/getSysArea',
		method: 'POST',
		data
	})
}

// 新增/修改地址 
export const addUserAddress = (data) => {
	return request({
		url: '/api/wanlshop/address/address',
		method: 'POST',
		data
	})
}

// 被服务人员列表 
export const getBfwList = (data) => {
	return request({
		url: '/api/tools/bfwList',
		method: 'POST',
		data
	})
}

// 新增编辑被服务人员
export const submitBfwSave = (data) => {
	return request({
		url: '/api/tools/bfwSave',
		method: 'POST',
		data
	})
}

// 删除被服务人员
export const delBfwSave = (data) => {
	return request({
		url: '/api/tools/bfwDel',
		method: 'POST',
		data
	})
}

// 获取系统配置 
export const getSysConfig = (data) => {
	return request({
		url: '/api/index/getSysConfig',
		method: 'POST',
		data
	})
}

// 获取服务人员列表 
export const getSkillList = (data) => {
	return request({
		url: '/api/service/skill/searchskill',
		method: 'POST',
		data
	})
}

// 用户优惠券列表 
export const getUserCouponList = (data) => {
	return request({
		url: '/api/service/coupon/usercoupon',
		method: 'POST',
		data
	})
}

// 优惠券列表 
export const couponGetlist = (data) => {
	return request({
		url: '/api/service/coupon/getlist',
		method: 'POST',
		data
	})
}

// 领取优惠券
export const couponReceive = (data) => {
	return request({
		url: '/api/service/coupon/receive',
		method: 'POST',
		data
	})
}

// 获取商品下附加服务/医护工具 
export const getGoodsAddList = (data) => {
	return request({
		url: '/api/service/goods/goodsAddList',
		method: 'POST',
		data
	})
}

// 确认订单 
export const getGoodsOrderSettle = (data) => {
	return request({
		url: '/api/service/order/settle',
		method: 'POST',
		data
	})
}

// 创建订单 /api/service/order/createorder
export const getGoodsOrderCreate = (data) => {
	return request({
		url: '/api/service/order/createorder',
		method: 'POST',
		data
	})
}

// 获取余额 
export const getBalance = (data) => {
	return request({
		url: '/api/wanlshop/pay/getBalance',
		method: 'POST',
		data
	})
}

// 订单列表 
export const userorderlist = (data) => {
	return request({
		url: '/api/service/order/userorderlist',
		method: 'POST',
		data
	})
}
// 订单详情 
export const serviceOrderInfo = (data) => {
	return request({
		url: '/api/service/order/orderInfo',
		method: 'POST',
		data
	})
}
// 取消订单 
export const cancelOrder = (data) => {
	return request({
		url: '/api/service/order/cancelOrder',
		method: 'POST',
		data
	})
}

// 退款原因 
export const refundreason = (data) => {
	return request({
		url: '/api/service/order/refundreason',
		method: 'POST',
		data
	})
}

// 申请退款 
export const refundorder = (data) => {
	return request({
		url: '/api/service/order/refundorder',
		method: 'POST',
		header:{
			"content-type":data.contentType
		},
		data:data.buffer
	})
}

// 删除订单
export const delOrder = (data) => {
	return request({
		url: '/api/service/order/delOrder',
		method: 'POST',
		data
	})
}

// 撤销申请 
export const cancelRefund = (data) => {
	return request({
		url: '/api/service/order/cancelRefund',
		method: 'POST',
		data
	})
}


// 用户需求  type：set=设置,get=获取信息
export const userBmXq = (data) => {
	return request({
		url: '/api/service/bm/userBmXq',
		method: 'POST',
		header:{
			"content-type":data.contentType
		},
		data:data.buffer
	})
}
// 推荐保姆
export const getBmList = (data) => {
	return request({
		url: '/api/service/bm/getBmList',
		method: 'POST',
		data
	})
}
// 保姆套餐
export const getBmTc = (data) => {
	return request({
		url: '/api/service/bm/getBmTc',
		method: 'POST',
		data
	})
}
// 购买保姆套餐
export const BmOrder = (data) => {
	return request({
		url: '/api/service/bm/BmOrder',
		method: 'POST',
		data
	})
}
// 解锁保姆
export const jsBm = (data) => {
	return request({
		url: '/api/service/bm/jsBm',
		method: 'POST',
		data
	})
}
// 保姆详情
export const BmDetail = (data) => {
	return request({
		url: '/api/service/bm/getBmInfo',
		method: 'POST',
		data
	})
}



// 区域代理
// 添加编辑企业微信 /api/service/qun/setQun
export const setQun = (data) => {
	return request({
		url: '/api/service/qun/setQun',
		method: 'POST',
		data
	})
}
// 获取企业群列表 
export const getQunList = (data) => {
	return request({
		url: '/api/service/qun/getQunList',
		method: 'POST',
		data
	})
}
// 删除企业微信群 
export const deleteQun = (data) => {
	return request({
		url: '/api/service/qun/deleteQun',
		method: 'POST',
		data
	})
}

// 订单评价 /api/service/comment/commentadd
export const commentadd = (data) => {
	return request({
		url: '/api/service/comment/commentadd',
		method: 'POST',
		data
	})
}

// 我的服务包/api/service/order/userFwb
export const userFwb = (data) => {
	return request({
		url: '/api/service/order/userFwb',
		method: 'POST',
		data
	})
}
// 服务包修改信息/api/service/order/editOrder
export const editOrder = (data) => {
	return request({
		url: '/api/service/order/editOrder',
		method: 'POST',
		data
	})
}


// 区域改价 
export const applyPrice = (data) => {
	return request({
		url: '/api/service/goods/applyPrice',
		method: 'POST',
		data
	})
}

// 改价记录 
export const getApplyPriceLog = (data) => {
	return request({
		url: '/api/service/goods/getApplyPriceLog',
		method: 'POST',
		data
	})
}

// 护理员审核列表 
export const areaBmList = (data) => {
	return request({
		url: '/api/service/bm/areaBmList',
		method: 'POST',
		data
	})
}

// 我的收益
export const getIncome = (data) => {
	return request({
		url: '/api/service/recharge/jiesuan',
		method: 'POST',
		data
	})
}

// 供货商入驻
export const supplierJoin = (data) => {
	return request({
		url: '/api/wanlshop/shop/shopEnter',
		method: 'POST',
		data
	})
}